package com.design.homework.hw0317.observer.gperadvice.v2.user;

import com.design.homework.hw0317.observer.gperadvice.v2.question.GPerEntertainmentQuestion;
import com.design.homework.hw0317.observer.gperadvice.v2.question.GPerQuestion;

/**
 * @author qiqiang.ren
 * @since 2019/3/20
 */
public class EntertainmentTeacher extends AbstractTeacher {

    public EntertainmentTeacher(String name, Integer age, Integer gender) {
        super(name, age, gender);
    }

    @Override
    public void answer(GPerQuestion question) {
        if (question instanceof GPerEntertainmentQuestion) {
            System.out.println("同学听" + getName() + "老师给你慢慢道来...");
        } else {
            System.out.println("同学，你这个问题" + getName() + "老师无法回答");
        }
    }
}
